<template>
    <div class='test-box'>
        <h3>用户自定义的test/vue- {{ username }}</h3>
        <button @click='changeName'>修改用户名</button>
    </div>
</template>

<script>
    export default {
        //data数据源 是一个函数
        data () {
            return {
                username: 'zhangsan'
            }
        },
        methods: {
            changeName () {
                this.username = 'wahaha'
            }
        },
        watch: {},
        computed: {},
        filters: {},
    }
</script>


<style lang='less' scoped>
    .test-box {
        background-color: pink;
        h3 {
            color: red
        }
    }
</style>